package com.library.dao;

import com.library.entity.User;

import my.db.QueryHelper;

public class UserDao {

	public User get(Long id) {
		String sql = "select * from user where id=?";
		return QueryHelper.queryUnique(User.class, sql, id);
	}

	public User findByName(String name) {
		String sql = "select * from user where uname=?";
		return QueryHelper.queryUnique(User.class, sql, name);
	}
}
